<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>财务报账系统demo</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />	 
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		
		
		<link rel="stylesheet" href="plug-in/jquery/jquery.contextmenu.css"/>		
		<link href="plug-in/ace/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="plug-in/ace/assets/css/font-awesome.min.css" />
		<link rel="stylesheet" href="plug-in/ace/assets/css/ace.min.css" />
		<link rel="stylesheet" href="plug-in/ace/assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="plug-in/ace/assets/css/ace-skins.min.css" />


		<script src='plug-in/ace2/assets/js/jquery.min.js'></script>	
		<script src="plug-in/ace/assets/js/ace-extra.min.js"></script>
		<script src="plug-in/toast/toastr.min.js"></script>
		<link rel="stylesheet" href="plug-in/toast/toastr.css" />

		<!--[if lt IE 9]>
		<script src="plug-in/ace/assets/js/html5shiv.js"></script>
		<script src="plug-in/ace/assets/js/respond.min.js"></script>
		<![endif]-->
		<style type="text/css">
		.bootbox-body{
		font-size:20px;
		font-family: Microsoft YaHei;
		}
		.modal-content{
		border-radius:10px;
		top:250px;
		}
		.modal-footer{
		border-radius:10px;
		padding-top: 10px;
		}
		.btn{
		border-radius:10px;
		}
		.ace-nav>li.light-blue>a:hover,
		.ace-nav>li.light-blue>a:visited{
			background-color: white !important;
		}
		.navbar{
			background-color: white;
		}
		.nav-tabs{
			display:none;
		}
		.navbar-default .navbar-nav>.activeItem>a, 
		.navbar-default .navbar-nav>.activeItem>a:hover,
	    .navbar-default .navbar-nav>.activeItem>a:focus {
		    color: #f5f5f5;		    
		}
		.nav-list>li.menuCategory{
			display:none;
		}
		
		.navbar .navbar-brand {
			padding-top:15px;
			color:black;
		}
		
		.ace-nav>li.light-blue>a{
			background-color:white;
		}
		
		.navbar .navbar-brand:hover,
		.navbar .navbar-brand:VISITED {
			color:black;
		}
		
		.nav-list>li .submenu>li.activeMenuItem>a{
    		text-decoration: none;
    		color: #4b88b7;
    		font-weight: bold;
		}
		.nav-list>li .submenu>li.activeMenuItem a>[class*="icon-"]:first-child {
		    display: inline;
		    font-size: 12px;
		    font-weight: normal;
		    width: 18px;
		    height: auto;
		    line-height: 12px;
		    text-align: center;
		    position: absolute;
		    left: 10px;
		    top: 11px;
		    z-index: 1;
		    background-color: #FFF;
    	}
		</style>
	</head>

	<body onbeforeunload="return windowload()">
		<div class="navbar navbar-default" id="navbar">
			<script type="text/javascript">
				try{ace.settings.check('navbar' , 'fixed')}catch(e){}
			</script>

			<div class="navbar-container" id="navbar-container">
				<div class="navbar-header pull-left">
					<a href="#" class="navbar-brand" style="font-size:25px;">
						财务报账系统Demo
					</a><!-- /.brand -->
				</div><!-- /.navbar-header -->
				<div id="topMenu"> 
					<ul class="nav navbar-nav">						 
        			</ul>
				</div>

				<div class="navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">				  
					<li class="light-blue" style="height: 51px;">
							<a data-toggle="dropdown" href="#" class="dropdown-toggle">								 
								<span class="user-info" >
				                    <span style="color: #666633;height: 40px;line-height: 40px;">${LOCAL_CLINET_USER.realName}</span>
								</span>
								<i style="color:black;" class="icon-caret-down"></i>
							</a>

							<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
							
								<li>
									<a href="javascript:viewUserInfo()">
										<i class="icon-user"></i>
										 <t:mutiLang langKey="common.profile"/>
									</a>
								</li>
 

								<li>
									<a href="javascript:logout()">
										<i class="icon-off"></i>
										 <t:mutiLang langKey="common.logout"/>
									</a>
								</li>
							</ul>
						</li>
					</ul><!-- /.ace-nav -->
				</div><!-- /.navbar-header -->
			</div><!-- /.container -->
		</div>

		<div class="main-container" id="main-container">
			<div class="main-container-inner">
 				<div class="sidebar" id="sidebar"> 
					<ul class="nav nav-list">
						<c:if test="${LOCAL_CLINET_USER.userName ne 'endurego'}">
						<li class="active">
							<a  href="javascript:addTabs({id:'home',title:'选择服务',close: false,url: 'selectService.do?goSelect'});">
								<i class="icon-pencil"></i>
								<span class="menu-text">填写报税单</span>
							</a>
						</li>
						<li>
							<a  href="javascript:addTabs({id:'home',title:'我的报税单',close: false,url: 'selectService.do?goMyForm'});">
								<i class="icon-file-alt "></i>
								<span class="menu-text">我的报税单</span>
							</a>
						</li>
						</c:if>			
						<c:if test="${LOCAL_CLINET_USER.userName eq 'endurego'}">
							<li>
								<a  href="javascript:addTabs({id:'home',title:'表单审核',close: false,url: 'selectService.do?goAuditList'});">
									<i class=" icon-list-alt "></i>
									<span class="menu-text">表单审核</span>
								</a>
							</li>
						</c:if>			
						
						<t:menu style="ace" menuFun="${menuMap}"></t:menu> 
					</ul><!-- /.nav-list -->

 				</div>

				<div class="main-content">
					<div class="page-content" style='padding-bottom:0'>
						<div class="row">
							<div class="col-xs-12" style="width:99%;padding-left:0;padding-right: 0;" id="tabs">
	                            <ul class="nav nav-tabs" role="tablist">
	                            </ul>
	                            <div class="tab-content" style='margin:0;padding:0'>
	                                <div role="tabpanel" class="tab-pane active" id="Index">
	                                </div>
	                            </div>
	                        </div>
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
 
			</div><!-- /.main-container-inner -->
 
		</div><!-- /.main-container --> 
 
 
		<!-- basic scripts -->

		<script type="text/javascript">
			var currentMenuId = null;
			var currentTopMenu = null;
			function openSubMenu(thisObj,id){
				if(currentMenuId != null){
					$('.mcate_'+currentMenuId).hide();
				}
				
				if(currentTopMenu != null){
					$(currentTopMenu).parent().removeClass("activeItem");
				}
				$(thisObj).parent().addClass("activeItem");
				currentTopMenu = thisObj;
				
 				
				currentMenuId = id;
				$('.mcate_'+id).show();
			}
		
			function viewUserInfo(){
				 var addurl = 'userController.do?userinfo';
				  $.dialog({
					  	id:'xxx1',
						content: 'url:'+addurl,
						lock : true,
						zIndex: 1000, 
						width:660,
						height:240,
						title:'用户信息', 
						opacity : 0.3,
						cache:false, 
					    cancelVal: '关闭',
					    cancel: true /*为true等价于function(){}*/
					});
			}
			
			function changePassword(){
				 var addurl = 'userController.do?changepassword';
				  $.dialog({
					  	id:'xxx',
						content: 'url:'+addurl,
						lock : true,
						zIndex: 1000, 
						width:550,
						height:200,
						title:'修改密码', 
						opacity : 0.3,
						cache:false,
					    ok: function(){
					    	iframe = this.iframe.contentWindow;
					    	$('#btn_sub', iframe.document).click(); 
							return false;
					    },
					    cancelVal: '关闭',
					    cancel: true /*为true等价于function(){}*/
					});
			}
			
		 
		  
		</script>

		<!--[if IE]>
		<script type="text/javascript">
		 window.jQuery || document.write("<script src='plug-in/ace/assets/js/jquery-1.10.2.min.js'>"+"<"+"script>");
		</script>
		<![endif]-->

	
		<script src="plug-in/ace/assets/js/bootstrap.min.js"></script>
		<script src="plug-in/ace/assets/js/typeahead-bs2.min.js"></script>

		<script src="plug-in/ace/assets/js/jquery-ui-1.10.3.custom.min.js"></script>		
		<script src="plug-in/ace/assets/js/jquery.slimscroll.min.js"></script>		
		<!-- ace scripts --> 
		<script src="plug-in/ace/assets/js/ace-elements.min.js"></script>
		<script src="plug-in/ace/assets/js/ace.min.js"></script>		
		<t:base type="tools"></t:base>
		<script src="plug-in/jquery-plugs/storage/jquery.storageapi.min.js"></script>
		<script type="text/javascript" src="plug-in/ace/assets/js/bootstrap-tab.js?v=20"></script>
 		<script src="plug-in/jquery/jquery.contextmenu.js"></script>
		<script src="plug-in/layer/layer.js"></script>
	    <script src="plug-in/ace/js/bootbox.js"></script>
		<!-- inline scripts related to this page -->
		<script>
		  jQuery(function($) {
			  
			if(window.top != window){
				window.top.location.reload();
				return;
			}  
			
			//显示哪些一级菜单
			initTopMenu('mcate_1');
			initTopMenu('mcate_2');
			initTopMenu('mcate_3');
			initTopMenu('mcate_4');
			initTopMenu('mcate_6');
			initTopMenu('mcate_7');
			initTopMenu('mcate_score');
			initTopMenu('mcate_stat');
			
			var pageURL = "${pageToOpen}";
			if(pageURL != ''){
				addTabs({id:'home',title:'',close: false,url: pageURL}); //打开默认页面
			}else{ 
				<c:if test="${LOCAL_CLINET_USER.userName ne 'endurego'}">
					addTabs({id:'home',title:'填写报税单',close: false,url: 'selectService.do?goSelect'}); //打开默认页面
				</c:if>
				<c:if test="${LOCAL_CLINET_USER.userName eq 'endurego'}">
					addTabs({id:'home',title:'表单审核',close: false,url: 'selectService.do?goAuditList'});
				</c:if> 
			} 
		});  
		  
		function initTopMenu(id){
			length = $("li."+id).length;
			if(length == 0)$('#'+id).hide();
		}
				
		
		jQuery(function($) {
			$('.dialogs,.comments').slimScroll({
				height: '300px'
		    });
		})
		

		function loadModule(title,url,target){
 			    $("#mainTitle").text(title);
      			$("#center").attr("src",url);
      	}
		

	  	function logout(){	  		
	  		bootbox.confirm("<t:mutiLang langKey="common.exit.confirm"/>", function(result) {
	  			if(result)
		  			location.href="loginController.do?logout";
	  		});
  		}
	  	
		function opendialog(title,url,target){
			//$("#dialog").attr("src",url);
			bootbox.dialog({
				message:$("#changestylePanel").html(),
				title:title,
				buttons:{
				OK:{
				label: "OK", 
				callback:function(){
					    var indexStyle = $('input[name="indexStyle"]:checked').val();
					    if(indexStyle==undefined||indexStyle==""){
					    	indexStyle = "ace";
					    }
					    var cssTheme = $('input[name="cssTheme"]:checked').val();
					    if(cssTheme==undefined){
					    	cssTheme = "";
					    }
						var form = $("#formobj");//取iframe里的form
						$.ajax({
		        			url:form.attr('action'),
		        			type:form.attr('method'),
		        			data:"indexStyle="+indexStyle,//+"&cssTheme="+cssTheme,
		        			success:function(data){
								var d = $.parseJSON(data);
								if (d.success) {
									var msg = d.msg;
									bootbox.alert(msg);
								}else{
									bootbox.alert(d.msg);
								}
		        			},
		        			error:function(e){
		        				bootbox.alert("出错了哦");
		        			}
						});
					}
			},Cancel: {label: "CLOSE", 
				callback:function() {

					}
				}
			}});
  			
  		}  
     
		
		   function windowload() {   
	            var n = window.event.screenX - window.screenLeft;   
	            var b = n > document.documentElement.scrollWidth-20;   
	            if(b && window.event.clientY < 0 || window.event.altKey){   
	                window.event.returnValue = ""; //此处放你想要操作的代码 
	            }else{	                   
	            }
	        } 
		    		 
</script>
 
</body>
</html>

